package tech.aistar.day09;

import java.util.ArrayList;
import java.util.List;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2022/7/28 9:27 上午
 */
public class ArrayListDetailDemo {
    public static void main(String[] args) {
        List<Book> books = new ArrayList<>();
        Book b1 = new Book(1,"java",100.0d);
        Book b2 = new Book(2,"python",200.0d);

        Book b3 = new Book(1,"mysql",100.0d);

        books.add(b1);
        books.add(b2);

        System.out.println(books.contains(b3));//true

        books.remove(b3);//b3.equals(b1);//返回true

        System.out.println(books);

        //List<Long> integers = new ArrayList<>();;
        //integers.add(1L); //
        //integers.add(2L);
        //integers.add(3L);
        //
        //integers.remove(2L);
        //System.out.println(integers);
    }
}
